from django_filters import rest_framework as filters

from .models import Person


class PersonFilter(filters.FilterSet):
    class Meta:
        model = Person

        fields = {
            'card_id': ['exact', ],
            'name': ['icontains', ],
            'permanent_residence': ['icontains', ],
            'mobile': ['exact', ],
            'gender': ['exact', ],
            'age': ['exact', 'gte', 'lte'],
            'is_vaccine': ['exact', ],
            'status': ['exact', ],
        }
